<template>
	<button class="btn btn-sm btn-primary" @click="updateAd">修改</button>
  <vue-modal
    title="修改广告"
    ok-text="提交"
    cancel-text="取消"
    :show.sync="showUpdateAdModal"
    effect="fade"
    :small="true"
    :width="500"
    :callback="submit">
    <div slot="modal-body" class="modal-body">
      <form class="form-horizontal" role="form">
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*广告语</label>
          <div class="col-sm-9 text-left">
            <input type="text" class="form-control" v-model="ad.title">
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*广告链接</label>
          <div class="col-sm-9 text-left">
            <input type="text" class="form-control" v-model="ad.location">
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*外部浏览器打开</label>
          <div class="col-sm-9 text-left">
            <select class="form-control" v-model="ad.allowExtend">
              <option value="0">否</option>
              <option value="1">是</option>
            </select>
          </div>
        </div>
      </form>
    </div>
  </vue-modal>
</template>
<style src="./mini-ad-update.css" scoped></style>
<script src="./mini-ad-update.js"></script>